import request from '@/utils/request'

// 查询资产信息列表
export function listProperty(query) {
  return request({
    url: '/it/property/list',
    method: 'get',
    params: query
  })
}

// 查询资产信息详细
export function getProperty(id) {
  return request({
    url: '/it/property/' + id,
    method: 'get'
  })
}

// 新增资产信息
export function addProperty(data) {
  return request({
    url: '/it/property/save',
    method: 'post',
    data: data
  })
}

// 修改资产信息
export function editProperty(data) {
  return request({
    url: '/it/property/update',
    method: 'put',
    data: data
  })
}

// 修改资产状态待报废
export function waitScrapProperty(data) {
  return request({
    url: '/it/property/waitScrapProperty',
    method: 'put',
    data:data
  })
}

// 修改资产状态已损坏
export function destroyedProperty(data) {
  return request({
    url: '/it/property/destroyedProperty',
    method: 'put',
    data:data
  })
}

// 删除资产信息
export function delProperty(id) {
  return request({
    url: '/it/property/remove/' + id,
    method: 'delete'
  })
}



// 导出资产信息
export function exportProperty(query) {
  return request({
    url: '/it/property/export',
    method: 'get',
    params: query
  })
}
